how to construct a distance time graph